package com.forgenet.gate.session;

import com.sparrow.socket.tcp.session.impl.GameSession;
import com.sparrow.socket.tcp.session.manager.AbstractSessionManager;

import java.util.concurrent.ConcurrentHashMap;

public class GatePlayerSessionManager extends AbstractSessionManager<Long, GameSession> {

    private ConcurrentHashMap<String, GameSession> unAuthSessions = new ConcurrentHashMap<>();


    public void putUnAuthSession(String account, GameSession session) {
        unAuthSessions.put(account, session);
    }

    public GameSession getUnAuthSession(String account) {
        return unAuthSessions.get(account);
    }

    public GameSession removeUnAuthSession(String account) {
        return unAuthSessions.remove(account);
    }
}
